import { ApiProperty } from "@midwayjs/swagger";
import { ApiRes } from ".";

export class FilesDto{
  @ApiProperty({ description: '文件名'})
  filename: string
  @ApiProperty({ description: '存储路径'})
  data: string
  @ApiProperty({ description: '文件格式'})
  fieldName: string
  @ApiProperty({ description: '文件类型'})
  mimeType:string
}

export class UploadDto {
  // ...
  @ApiProperty({
    type: 'string',
    format: 'binary',
  })
  file: FilesDto;
}

export class UploadRes {
  url:string
}

export class UploadResDto extends ApiRes<UploadRes>(
  UploadRes
) {}
